package sugarbind_input

class Article_Type {

    String article_Type_Name
	
    static constraints = {
			article_Type_Name(blank:false)
			
			article_Type_Name(unique:true)
	}
	
	static hasMany = [articles: Article]
	
	static mapping = {
//		id column: 'article_type_id'
		id generator: 'sequence', params: [sequence: 'article_type_id_seq']
	}
	
	public String toString(){
		article_Type_Name + " ($id)"
	}
	
	public static listArticle_Types()
	{
		Article_Type.list().sort{ it.toString(); }
	} 
	
	
}
